import request from "@/utils/request";


// 菜单相关
export function MenuList(){
    return request.get("/menu/list")
}

export function MenuAllList(){
    return request.get("/menu/Alllist")
}
export function MenuFirstList(){
    return request.get("/menu/getParent")
}
export function GetMenuList(data){
    return request.get("/menu/selectList",{params:data})
}
export function GetMenuShouquanList(){
    return request.get("/menu/query/shouquan")
}
export function MenuDelete(data){
    return request.delete("/menu/delete?id="+data)
}
export function MenuAdd(data){
    return request.post("/menu/add",data)
}

export function MenuListAuthor(){
    return request.get("/menu/list/author")
}
export function MenuFirstListAuthor(data){
    return request.get("/menu/list/first/author/"+data)
}


// 角色相关
export function RoleList(roleName){
    return request.get("/role/list",{params:roleName})
}
export function RoleAdd(data){
    return request.post("/role/add",data)
}
export function RoleDelete(data){
    return request.delete("/role/delete?id= "+data)
}
export function RoleUpdate(data){
    return request.put("/role/update",data)
}
//角色权限
export function RoleMenuAdd(data){
    return request.post("/role/menu/add",data)
}
